home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Magazine Collection 2001
/
Delphi Magazine Collection 20001 (2001).iso
/
DISKS
/
ISSUE03
/
TYPECAST
/
MATHSU.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-07-08
|
726b
|
44 lines
unit Mathsu;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Spin;
type
TForm1 = class(TForm)
Op1: TSpinEdit;
Op2: TSpinEdit;
Res: TSpinEdit;
Label1: TLabel;
Label2: TLabel;
procedure OpChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.OpChange(Sender: TObject);
var
Num1, Num2: Word;
Num3: Longint;
begin
if (Op1.Text = '') or (Op2.Text = '') then
Exit;
Num1 := Op1.Value;
Num2 := Op2.Value;
Num3 := Num1 * Num2;
Res.Value := Num3;
end;
end.